
if not SYSPATH then return end
    -----------------------------------------
    --公共语音界面
    -----------------------------------------
    local zOrder    = 1000
    local MAX_TIME  = 15         --录音最大时间
    local meta  	= class("TalkView",PanelInner)
    local model     = app.model("common")
    local hall_model= app.model("hall")
    local scheduler 	= require("framework.scheduler")
    Effects:addSpriteFrames("Wave")      --加载语音动画
    meta.main = nil
    meta.schedul = nil
    
    function meta:ctor()
        self.class.super.ctor(self)
        self:init()
    end
    
    function meta:onEnter()
        self.class.super.onEnter(self)
        
    end
    
    function meta:onExit()
        if self.schedul then
            scheduler.unscheduleGlobal(self.schedul)
            self.schedul = nil
        end
    end
    
    function meta:init()
        self.main = cc.CSLoader:createNode("zjh/res/talkLayer.csb")
        self:addChild(self.main,999)
        Adaptive(self.main).h()
    end
    
    function meta:updateData(param)
        self._type = param
        local bg = cc.uiloader:seekNodeByName(self.main, "bg")
        local size = bg:getContentSize()
        if self._type == "began" then
            local animate=Effects:getAnimation("wave",5)
            local sp=cc.Sprite:createWithSpriteFrameName("wave0.png")
            sp:setPosition(cc.p(size.width/2+50,size.height/2))
            sp:playAnimationForever(animate)
            sp:setTag(101)
            sp:setScale(0.3)
            bg:addChild(sp)
    
            local img = cc.uiloader:seekNodeByName(self.main, "img_bg")
            local bar = display.newProgressTimer("zjh/res/talk/jindu_2x.png",0)
            bar:setPosition(cc.p(size.width/2 + 2,size.height/2 + 2))
            img:addChild(bar)
            local sTime = 0
            local function callback()
                sTime = sTime - 0.1
                if sTime < 0 then
                    scheduler.unscheduleGlobal(self.schedul)
                    self.schedul = nil
                    game.view.back("common.talk","zjh")
                else        
                    local tage = (MAX_TIME - sTime)/MAX_TIME * 100
                    if bar then
                        bar:setPercentage(tage)
                    end
                end
            end
            
            if not self.schedul then
                sTime = MAX_TIME
                print("看得开快递快递")
                self.schedul = scheduler.scheduleGlobal(callback ,0.1)
            end
        elseif self._type == "fail" or self._type == "cancle" or self._type == "ended" then --
            bg:removeChildByTag(101)
            print("self._type === ",self._type,self.schedul)
            if self.schedul then
                print("空间的空地上")
                scheduler.unscheduleGlobal(self.schedul)
                self.schedul = nil
            end
            game.view.back("common.talk","zjh")
        end
    end
    
    return meta